<!--
 * @Author: 13474815223 nm.baoxuhui@aisino.com
 * @Date: 2023-11-07 17:16:37
 * @LastEditors: 13474815223 nm.baoxuhui@aisino.com
 * @LastEditTime: 2023-11-07 17:19:47
 * @FilePath: \tjbuildingprojectmanagesysweb\src\views\login\components\MyInput.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
    <div class="my-input clearfix">
      
        <input :type="type" :placeholder="placeholder" v-model.trim="text" @change="change">
    </div>
</template>
<script>
export default {
    props:{
        value:{
            type:String
        },
        icon:{
            type:String
        },
        placeholder:{
            type:String
        },
        type:{
            type:String,
            default:'text'
        }
    },
    data(){
        return {
            text:this.value
        }
    },
    watch:{
        value(val){
            this.text=val
        }
    },
    methods:{
        change(){
            this.$emit('input',this.text);
        }
    }
}
</script>
